package com.example.demo.utils;

import lombok.Getter;

/**
 * TODO
 * 响应枚举类型
 * @author caiyonglan
 * @email 627064518@qq.com
 * @date 2020/12/2 15:00
 */
@Getter
public enum ExceptionMsg {
    //
    SUCCESS(200, "success"),
    FAILED(400, "failed"),
    // 600+ 自定义业务异常
    TESTEXECEPTION(600, "自定义业务异常"),
    INSERTSUCCESS(601, "新增成功"),
    INSERTFAILED(602, "新增失败"),
    DELETESUCCESS(603, "删除成功"),
    DELETEFAILED(604, "删除失败"),
    SELECTSUCCESS(605, "查询成功"),
    SELECTFAILED(606, "查询失败");

    ExceptionMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private Integer code;
    private String msg;
}
